/**
 * 
 */
package com.vivid.dynamics.oknow.dao;

import java.io.Serializable;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.vivid.dynamics.oknow.model.Group;

/**
 *	DAO methods involving the Group.
 * @author jason
 * created at:: Jul 28, 2011 12:19:14 PM
 */
/*
 * Repository annotation states that this class will have 
 * the Exception Translation facility 
 */
@Repository
public interface IGroupDAO {
	/**
	 * return the Group instance under the given pId
	 * @param pId
	 * @return
	 * @author jason
	 * created at:: Jul 28, 2011  12:20:03 PM
	 */
	public Group getGroupByKey(final int pId);
	
	/**
	 * add a new Group based on the give pGroup; return a Serializable 
	 * Object which is the Primary Key's value (if available)
	 * @param pGroup
	 * @return
	 * @author jason
	 * created at:: Jul 28, 2011  5:12:43 PM
	 */
	public Serializable newGroup(final Group pGroup);
	
	/**
	 * update the given Group instance to db
	 * @param pGroup
	 * @author jason
	 * created at:: Jul 28, 2011  5:08:37 PM
	 */
	public void updateGroup(final Group pGroup);
	
	/**
	 * remove the given instance. Supply the instance instead of <b>'KEY'</b>
	 * 
	 * @param pGroup
	 * @author jason
	 * created at:: Jul 29, 2011  12:30:44 PM
	 */
	public void deleteGroup(final Group pGroup);
	
	/**
	 * return all Group(s), might be deprecated in the future
	 * @return
	 * @author jason
	 * created at:: Jul 29, 2011  3:07:31 PM
	 */
	public List<Group> getAll();
}
